package com.weblog.model.article;

import org.springframework.data.mongodb.core.mapping.Document;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * comment实体类
 * @author MaoLin Wang
 *
 */
@Document(collection = "comment")
public class Comment implements Serializable{

	private static final long serialVersionUID=-3344446655562943999L;

	/**
	 * 评论id
	 */
	@Id
	private String _id;

	/**
	 * 文章id
	 */
	private String articleid;
	/**
	 * 评论内容
	 */
	private String content;
	/**
	 *评论时间
	 */
	private Date createtime;
	/**
	 *被评论用户id
	 */
	private String targetid;
	/**
	 *评论人id
	 */
	private String userid;
	/**
	 *评论者昵称
	 */
	private String username;
	/**
	 *被评论的评论id 0代表该文章的顶级评论
	 */
	private String parentid;
	/**
	 *被回复数量
	 */
	private Integer replynum;
	/**
	 *点赞数
	 */
	private Long thumbup;
	/**
	 *1启用 0不启用
	 */
	private String state;


	public String get_id() {
		return _id;
	}

	public void set_id(String _id) {
		this._id = _id;
	}

	public String getArticleid() {
		return articleid;
	}
	public void setArticleid(String articleid) {
		this.articleid = articleid;
	}

	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreatetime() {
		return createtime;
	}
	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public String getUserid() {
		return userid;
	}
	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}

	public String getParentid() {
		return parentid;
	}
	public void setParentid(String parentid) {
		this.parentid = parentid;
	}

	public Integer getReplynum() {
		return replynum;
	}
	public void setReplynum(Integer replynum) {
		this.replynum = replynum;
	}

	public Long getThumbup() {
		return thumbup;
	}
	public void setThumbup(Long thumbup) {
		this.thumbup = thumbup;
	}

	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}

	public String getTargetid() {
		return targetid;
	}

	public void setTargetid(String targetid) {
		this.targetid = targetid;
	}
}
